{% extends "../main.html" %}
{% block nem %}
<ul class="nav nav-sidebar">
    <li><a href="/hosts">主机管理</a></li>
    <li class="active"><a href="/hosts/add">添加</a></li>
    <li><a href="/hosts/update">更新</a></li>

</ul>
{% end %}
{% block bodyy %}
<h3 class="sub-header" content="">新增主机</h3>
    <div class="panel-body">
        <form class="form-horizontal" method="post">
            <div class="form-group">
                <label class="col-sm-2 control-label">主机IP</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="主机IP地址" name="hip">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">主机组</label>
                <div class="col-sm-10">
                    <select id="sel_menu" class="form-control" name="hgroup">
                        {% for i in data %}
                        <option value="{{i[0]}}">{{i[1]}}</option>
                        {%end%}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">主机端口</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="主机端口:0~65535" name="hport" value=22>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">主机用户</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="主机用户" name="huser" value="root">
                </div>
            </div>
            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">主机密码</label>
                <div class="col-sm-10">
                    <input type="password" class="form-control" id="inputPassword3" placeholder="密码" name="hpasswd">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">主机状态</label>
                <div class="col-sm-10">
                    <select id="sel_menu" class="form-control" name="hstatus">
                        <option value="1" selected>正常</option>
                        <option value="0">停用</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">监控状态</label>
                <div class="col-sm-10">
                    <select id="sel_menu" class="form-control" name="monit">
                        <option value="1" selected>开启监控</option>
                        <option value="0">关闭监控</option>

                    </select>
                </div>
            </div>


            <div class="form-group">
                <div class="col-sm-offset-5 col-sm-10">
                    <button type="submit" class="btn btn-primary">提交</button>
                    <button type="reset" class="btn btn-danger">重置</button>
                </div>
            </div>
        </form>
    </div>
{% end %}
